<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:url('Mei/advert')}">广告列表</a></li>
        <li class="active"><a href="{:url('Mei/advertAdd')}">添加广告</a></li>
    </ul>
    <form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('Mei/advertSave')}">

        <div class="form-group">
            <label class="col-sm-2 control-label"><span class="form-required">*</span>广告名称:</label>
            <div class="col-md-6 col-sm-10">
                <input type="text" class="form-control" name="title" value="{$res.title|default=''}">
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label"><span class="form-required">*</span>链接:</label>
            <div class="col-md-6 col-sm-10">
                <input type="text" class="form-control" name="url" value="{$res.url|default=''}">
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label"><span class="form-required">*</span>广告图片:</label>
            <div class="col-md-6 col-sm-10">
                <input type="file" class="form-control" name="img" >
                <input type="hidden" name="img1" value="{$res.img|default=''}">
            </div>
            <notempty name="$res.img">
            <img src="<?php echo DS . 'upload' . DS?>{$res.img|default=''}" width="50">
            </notempty>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label"><span class="form-required">*</span>开始时间:</label>
            <div class="col-md-2 col-sm-10">
                <input class="js-date" type="text" name="start_time" value="{$res.start_time|default=''}">
            </div>
            <label class="col-sm-1 control-label"><span class="form-required">*</span>结束时间:</label>
            <div class="col-md-3 col-sm-10">
                <input class="js-date" type="text" name="end_time" value="{$res.end_time|default=''}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label"><span class="form-required">开始时间，结束时间是必选的</span></label>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label"><span class="form-required">*</span>原价:</label>
            <div class="col-md-6 col-sm-10">
                <input type="text" class="form-control" name="yuan" value="{$res.yuan|default=''}">
            </div>
        </div>

        <input type="hidden" name="id" value="{$res.id|default=''}">
        <div class="form-group">
            <label class="col-sm-2 control-label"><span class="form-required">*</span>现价:</label>
            <div class="col-md-6 col-sm-10">
                <input type="text" class="form-control" name="xian" value="{$res.xian|default=''}">
            </div>
        </div>
        <div class="col-sm-offset-2 col-sm-10">
            <button type="submit" class="btn btn-primary js-ajax-submit">{:lang("SAVE")}</button>
        </div>
    </form>

</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>